{extend name="main/index" /}
{block name="main"}

<div class="content-page">
    <div class="content">

        <form class="form-inline" action="{:url('admin/Con1/doaddRole',['au_id',$au_id])}" method="post">
            <table class="table table-hover text-center">
                <input type="hidden" name="au_id" value="{$au_id}">
                <h2 class="text-center col-xs-12">用户角色更改</h2>
                <tr>

                    <td class="col-xs-12">
                        {if $k != 0}
                        {volist name="oldList" id="old"}
                        <div class="form-group">
                            <label class="checkbox-inline">
                                <input type="checkbox" id="inlineCheckbox1" value="{$old['r_id']}" name="role[{$old['r_rolename']}]" checked> {$old['r_rolename']}
                            </label>
                        </div>
                        {/volist}
                        {/if}

                        {volist name="list_role" id="v"}
                        <div class="form-group">
                            <label class="checkbox-inline">

                                {if $k == 0 }
                                <input type="checkbox" id="inlineCheckbox1" value="{$v['r_id']}" name="role[{$v['r_rolename']}]"> {$v['r_rolename']}
                                {else}
                                    <input type="checkbox" id="inlineCheckbox1" value="{$v['r_id']}" name="role[{$v['r_rolename']}]"> {$v['r_rolename']}
                                {/if}
                            </label>
                        </div>
                        {/volist}

                    </td>
                </tr>
                <tr>
                    <td class="col-xs-2">
                        <button type="submit" class="btn btn-danger">更改</button>
                    </td>
                </tr>
            </table>
        </form>
    </div>
</div>

{/block}